<!doctype html>
<html lang="zh">
<head>
	<meta charset="utf-8" />
	<meta http-equiv="content-type" content="text/html; charset=utf-8" />
	<title><?php echo $brandData['seo_title']; ?></title>
	<meta name="keywords" content="<?php echo str_replace(' ', ',', $brandData['seo_keyword']); ?>" />
	<meta name="description" content="<?php echo $brandData['seo_description']; ?>" />

	<link href="<?php echo $view['staticCss']; ?>/club/<?php echo $view['cssMainVer']; ?>/comm.css?<?php echo $view['cssVer']; ?>" rel="stylesheet" type="text/css" />
	<link href="<?php echo $view['staticCss']; ?>/club/<?php echo $view['cssMainVer']; ?>/list.css?<?php echo $view['cssVer']; ?>" rel="stylesheet" type="text/css" />

	<!-- 只允许引入两个js文件 -->
	<script src="<?php echo $view['staticJs']; ?>/jquery.js?<?php echo $view['jsVer']; ?>" type="text/javascript"></script>
	<script src="<?php echo $view['staticJs']; ?>/core2.js?<?php echo $view['jsVer']; ?>" type="text/javascript"></script>
</head>

<body>
	<?php include($view['basePath'].'/header.html');?>
	 <!-- logo展示区 -->
	<div class="wrap">
    	<div class="onsale_brand onsale_brand_hi" id="J_brandLogos">
			<div class="onsale_brand_show clearfix">
				<div class="onsale_style onsale_logo" id="J_brandLogos_todayTitle">
				<?php 
					switch ($query['channelId']) {
						case 0 :
							$logoStr = '在售';
							break;
						case 1 :
							$logoStr = '女士';
							break;
						case 2 :
							$logoStr = '男士';
							break;
						case 3 :
							$logoStr = '儿童';
							break;
						case 4 :
							$logoStr = '居家';
							break;
					}
					echo $logoStr . '品牌';
				?>
					<em class="icon_a"></em>
				</div>
				<div id="J_brandLogos_today"></div>
			</div>			
			<div id="J_brandLogos_arrow" class="onsale_icon_show">更多品牌</div>
            <div class="onsale_brand_hidden clearfix" id="J_brandLogos_hotSell">
				<div class="onsale_logo onsale_style_a onsale_style <?php echo $query['channelId'] ? 'onsale_style_font' : ''?>"><?php echo $query['channelId'] ? '<span class="block_a">'.$logoStr.'</span>' : ''; ?><span class="block_b">热销品牌</span><em class="icon_a"></em></div>
			</div>
        </div>
		
	<div class="pro_soldout">
		<form id="J_subscribe_frm" method="post" action="">
		<div class="pro_soldout_sub">
			<p class="pro_soldout_title">本期<?php echo $brandData['name']; ?>特卖专场商品已被抢购一空，您可以通过短信、邮件的方式订阅下期开售信息，届时我们会免费通知您。</p>
			<div class="subscribe_select">
				<select name="type" id="J_subscribe_type">
					<option value="1">手机订阅</option>
					<option value="2">邮件订阅</option>
				</select>
				<input type="text" name="J_subscribe_val" id="subscribe_input" value="请输入手机号码或邮箱" class="subscribe_text gray" />
				<em class="subscribe_tip light_red hidden J_input_tip" id="subscribe_input_tip">请输入正确的订阅信息</em>
			</div>
			<div class="pop_subscribe_btn"><button type="submit" id="J_sub_btn" class="btn_comm btn130 fl" value="订&nbsp;阅">订&nbsp;阅</button><a href="http://lux.vipshop.com" id="J_go_btn" class="btn_comm btn130_gray">逛逛最新专场</a></div>
			<p class="other_choose">* 如果您不希望通过短信、邮件接收，试试泡泡吧！桌面小助手，优惠资讯更丰富！<a class="deep_red" href="http://www.vipshop.com/widget/download.php" target="_blank">马上下载</a></p>
		</div>
		</form>
		<div class="tit_goods hidden">
			<div class="tit_goods_tab"><span class="toc selected">猜您喜欢</span></div>
			<div class="tit_goods_list">
				<dl class="pro_relate_list">
					<dt><a target="_blank" href="#"><img width="180" height="227" alt="男款黑/白色时尚短袖POLO衫" src="../img/detail_04.jpg"></a></dt>
					<dd title="Cerruti 1881">Cerruti 1881</dd>
					<dd title="男款黑/白色时尚短袖POLO衫">男款黑/白色时尚短袖POLO衫</dd>
					<dd><del>¥880</del><span class="new_price light_red">¥310</span></dd>	
				</dl>
				<dl class="pro_relate_list">
					<dt><a target="_blank" href="#"><img width="180" height="227" alt="男款黑/白色时尚短袖POLO衫" src="../img/detail_04.jpg"></a></dt>
					<dd title="Cerruti 1881">Cerruti 1881</dd>
					<dd title="男款黑/白色时尚短袖POLO衫">男款黑/白色时尚短袖POLO衫</dd>
					<dd><del>¥880</del><span class="new_price light_red">¥310</span></dd>	
				</dl>
				<dl class="pro_relate_list">
					<dt><a target="_blank" href="#"><img width="180" height="227" alt="男款黑/白色时尚短袖POLO衫" src="../img/detail_04.jpg"></a></dt>
					<dd title="Cerruti 1881">Cerruti 1881</dd>
					<dd title="男款黑/白色时尚短袖POLO衫">男款黑/白色时尚短袖POLO衫</dd>
					<dd><del>¥880</del><span class="new_price light_red">¥310</span></dd>	
				</dl>
				<dl class="pro_relate_list">
					<dt><a target="_blank" href="#"><img width="180" height="227" alt="男款黑/白色时尚短袖POLO衫" src="../img/detail_04.jpg"></a></dt>
					<dd title="Cerruti 1881">Cerruti 1881</dd>
					<dd title="男款黑/白色时尚短袖POLO衫">男款黑/白色时尚短袖POLO衫</dd>
					<dd><del>¥880</del><span class="new_price light_red">¥310</span></dd>	
				</dl>
				<dl class="pro_relate_list">
					<dt><a target="_blank" href="#"><img width="180" height="227" alt="男款黑/白色时尚短袖POLO衫" src="../img/detail_04.jpg"></a></dt>
					<dd title="Cerruti 1881">Cerruti 1881</dd>
					<dd title="男款黑/白色时尚短袖POLO衫">男款黑/白色时尚短袖POLO衫</dd>
					<dd><del>¥880</del><span class="new_price light_red">¥310</span></dd>	
				</dl>
			</div>
			<div class="tit_goods_bar">
				<div class="pro_block"></div><span>该品牌已售完，欢迎订阅！</span><div class="pro_block"></div>
			</div>
		</div>
	</div>	
		<script type="text/html" id="J_wrap_relate_template">
			{#items}
			<a target="_blank" href="#">
				<img width="77" height="97" alt="男款黑/白色时尚短袖POLO衫" src="../img/detail_04.jpg">￥325
			</a>
			{#/items}
		</script>

			<?php 
			if (count($merchandiseList)) {
			?>
        <div class="pro_list clearfix">
        	<?php
				for ($i = 0; $i < 40; $i++) {
					if (isset($merchandiseList['items'][$i])) {
						$merchandise = $merchandiseList['items'][$i];
					}
					else {
						break;
					}
			?>
            <dl class="J_pro_items" id="J_pro_<?php echo $merchandise['id'];?>" data-hover="dl_hover">
                <dt class="pro_list_pic">
					<a href="/detail-<?php echo $query['channelId'];?>-<?php echo $query['brandId'];?>-<?php echo $merchandise['id'];?>.html" title="<?php echo $merchandise['name'];?>" target="_blank">
						<img class="lazy J_first_pic" width="235" height="297" alt="<?php echo $merchandise['name'];?>" src="<?php echo $view['staticImg']; ?>/te/vip_loading.gif" data-original="<?php echo $merchandise['list_img'];?>" />
						<img class="hidden" width="235" height="297" src="" data-load="0" />
					</a>
					<span class="sold_tag soldout_tag" style="display:inline;"></span>
				</dt>
                <dd class="pro_list_tit"><a href="/detail-<?php echo $query['channelId'];?>-<?php echo $query['brandId'];?>-<?php echo $merchandise['id'];?>.html" target="_blank"><?php echo $merchandise['name'];?></a></dd>
				<dd class="pro_list_data">
					<span class="light_red"><em>&yen;<?php echo $merchandise['sell_price']; ?></em>(<?php echo $merchandise['discount']; ?>)</span>
					<del class="gray">&yen;<?php echo $merchandise['market_price']; ?></del>
				</dd>
            </dl>
			<?php 
					if (($i % 4) == 3) {
						echo '</div><div class="pro_list clearfix">';
					}
				}
			?>
        </div>
		<!-- 滚动异步加载 -->
		<div id="J_wrap_pro_add"></div>
				
		<div class="page">
            <div class="fr">
            <span class="page_total">共<?php echo $merchandiseList['total']; ?>条</span>
			<?php if ($query['page'] > 1) { ?>
			<a target="_self" href="/show-<?php echo $query['channelId'];?>-<?php echo $query['brandId'];?>-<?php echo $query['categoryId'];?>-<?php echo $query['sizeId'];?>-<?php echo $query['hasStock'];?>-<?php echo $query['orderId'];?>-<?php echo $query['page']-1;?>.html" class="page_previous" title="上一页"><</a>
		  	<?php }
		  		if (($query['page'] - 1) < 4) { 
					for ($i = 1;$i < $query['page'];$i++) {
			  ?>
			<a target="_self" href="/show-<?php echo $query['channelId'];?>-<?php echo $query['brandId'];?>-<?php echo $query['categoryId'];?>-<?php echo $query['sizeId'];?>-<?php echo $query['hasStock'];?>-<?php echo $query['orderId'];?>-<?php echo $i;?>.html"><?php echo $i; ?></a>
			<?php 	} 
				}
				else { ?>
			<a target="_self" href="/show-<?php echo $query['channelId'];?>-<?php echo $query['brandId'];?>-<?php echo $query['categoryId'];?>-<?php echo $query['sizeId'];?>-<?php echo $query['hasStock'];?>-<?php echo $query['orderId'];?>-1.html">1</a>
			<span class="page_dots">...</span>
			<a target="_self" href="/show-<?php echo $query['channelId'];?>-<?php echo $query['brandId'];?>-<?php echo $query['categoryId'];?>-<?php echo $query['sizeId'];?>-<?php echo $query['hasStock'];?>-<?php echo $query['orderId'];?>-<?php echo $query['page']-2;?>.html"><?php echo $query['page']-2;?></a>
			<a target="_self" href="/show-<?php echo $query['channelId'];?>-<?php echo $query['brandId'];?>-<?php echo $query['categoryId'];?>-<?php echo $query['sizeId'];?>-<?php echo $query['hasStock'];?>-<?php echo $query['orderId'];?>-<?php echo $query['page']-1;?>.html"><?php echo $query['page']-1;?></a>
		  <?php } ?>
			<span class="page_select"><?php echo $query['page']; ?></span>
		  <?php 
		  		if ($merchandiseList['pageCount'] - $query['page'] > 4) {
		  ?>
			<a target="_self" href="/show-<?php echo $query['channelId'];?>-<?php echo $query['brandId'];?>-<?php echo $query['categoryId'];?>-<?php echo $query['sizeId'];?>-<?php echo $query['hasStock'];?>-<?php echo $query['orderId'];?>-<?php echo $query['page']+1;?>.html"><?php echo $query['page']+1;?></a>
			<a target="_self" href="/show-<?php echo $query['channelId'];?>-<?php echo $query['brandId'];?>-<?php echo $query['categoryId'];?>-<?php echo $query['sizeId'];?>-<?php echo $query['hasStock'];?>-<?php echo $query['orderId'];?>-<?php echo $query['page']+2;?>.html"><?php echo $query['page']+2;?></a>
			<span class="page_dots">...</span>
			<a target="_self" href="/show-<?php echo $query['channelId'];?>-<?php echo $query['brandId'];?>-<?php echo $query['categoryId'];?>-<?php echo $query['sizeId'];?>-<?php echo $query['hasStock'];?>-<?php echo $query['orderId'];?>-<?php echo $merchandiseList['pageCount'];?>.html"><?php echo $merchandiseList['pageCount'];?></a>	
		  <?php	}
			  	elseif ($merchandiseList['pageCount'] != $query['page']) {
					for ($i = $query['page'] + 1;$i <= $merchandiseList['pageCount'];$i++) {
		  ?>
			<a target="_self" href="/show-<?php echo $query['channelId'];?>-<?php echo $query['brandId'];?>-<?php echo $query['categoryId'];?>-<?php echo $query['sizeId'];?>-<?php echo $query['hasStock'];?>-<?php echo $query['orderId'];?>-<?php echo $i; ?>.html"><?php echo $i; ?></a>
			  <?php }
			  	}
				if ($query['page'] < $merchandiseList['pageCount']) {
			?>
			<a target="_self" href="/show-<?php echo $query['channelId'];?>-<?php echo $query['brandId'];?>-<?php echo $query['categoryId'];?>-<?php echo $query['sizeId'];?>-<?php echo $query['hasStock'];?>-<?php echo $query['orderId'];?>-<?php echo $query['page']+1;?>.html" class="page_next" title="下一页">></a>
			<?php } ?>
            </div>
        </div>
		<?php 
		}
		else {
		?>
        <!--查找不到-->
        <div class="pro_list clearfix">
            <div class="pro_find_none">很抱歉，没有找到符合条件的商品</div>
        </div>
		<?php } ?>
    </div>
	<script type="text/javascript">
		var S_warehouse = wareHouse = '<?php echo $query['warehouse']?>';
		var brand = {
			id : <?php echo $brandData['id']; ?>,
			name : "<?php echo $brandData['name']; ?>",
			discount : '<?php echo $brandData['discount']; ?>',
			story : "<?php echo str_replace(array("\r\n", "\n", "\r", "\t"), '', $brandData['story']); ?>",
			end_time : <?php echo $brandData['end_time']; ?>,
			logo : "<?php echo $brandData['logo']; ?>",
			state : <?php echo $query['state']; ?>
		};
		
		var pg = {
			page : <?php echo $query['page']; ?>,
			channelId : <?php echo $query['channelId']; ?>,
			brandId : <?php echo $query['brandId']; ?>,
			categoryId : <?php echo $query['categoryId']; ?>,
			sizeId : <?php echo $query['sizeId']; ?>,
			hasStock : <?php echo $query['hasStock']; ?>,
			orderId : <?php echo $query['orderId']; ?>,
			businessType : 2,
			visitSource : 4
		};
		
		var logoTitle = {};
		switch (pg.channelId){
			case 0 :
				logoTitle = {close : '在售品牌', open_today : '今日上线'};
				break;
			case 1 :
				logoTitle = {close : '女士品牌', open_today : '<span class="block_a">女士</span><span class="block_b">今日上线</span>'};
				break;
			case 2 :
				logoTitle = {close : '男士品牌', open_today : '<span class="block_a">男士</span><span class="block_b">今日上线</span>'};
				break;
			case 3 :
				logoTitle = {close : '儿童品牌', open_today : '<span class="block_a">儿童</span><span class="block_b">今日上线</span>'};
				break;	
			case 4 :
				logoTitle = {close : '居家品牌', open_today : '<span class="block_a">居家</span><span class="block_b">今日上线</span>'};
				break;	
		}
		
		$.Loader
			.advScript(  {
				name : 'club-list',
				url : '<?php echo $view['staticJs']; ?>/club/<?php echo $view['jsMainVer']; ?>/list.js?<?php echo $view['jsVer']; ?>'
			}, {
				name : 'club-list-unusual',
				url : '<?php echo $view['staticJs']; ?>/club/<?php echo $view['jsMainVer']; ?>/list_unusual.js?<?php echo $view['jsVer']; ?>'
			}, {
				name : 'club-head',
				url : '<?php echo $view['staticJs']; ?>/club/<?php echo $view['jsMainVer']; ?>/header.js?<?php echo $view['jsVer']; ?>'
			}, {
				name : 'lazyload',
				url : '<?php echo $view['staticJs']; ?>/plugins/lazyload.js?<?php echo $view['jsVer']; ?>'
			}, {
				name : 'lazyloadAfter',
				def : function () { $("img.lazy").lazyload({ threshold : 200 }); },
				requires : ['lazyload']
			}, {
				name : 'inf',
				url : '<?php echo $view['staticJs']; ?>/club/<?php echo $view['jsMainVer']; ?>/inf.js?<?php echo $view['jsVer']; ?>'
			}, {
				name : 'inf-2',
				def : function () { 
					$(window).load(function () {
						comm();
					});
				},
				requires : ['inf']
			} );
		
		//滚动加载数据
		var merchandise = [
			<?php
				for ($i = 40; $i < count($merchandiseList['items']); $i++) {
					$merchandise = $merchandiseList['items'][$i];
	
					if($merchandise['sell_price'] == $merchandise['market_price']){
						$equal='0';
					}
					else{
						$equal='1';
					}
	
					if ($merchandise['sell_price'] == $merchandise['market_price']) {
						$merchandise['discount'] = '一口价';
					}
			?>
			{"id" : <?php echo $merchandise['id']; ?>, "img" : "<?php echo $merchandise['list_img']; ?>", "link" : "/detail-<?php echo $query['channelId'];?>-<?php echo $query['brandId'];?>-<?php echo $merchandise['id'];?>.html", "discount" : '(<?php echo $merchandise['discount']; ?>)', "sell_price" : "<?php echo $merchandise['sell_price']; ?>", "name" : "<?php echo $brandData['pre_name']; ?>&nbsp;<?php echo str_replace('"', "'", $merchandise['name']); ?>", "market_price" : "<?php echo $merchandise['market_price']; ?>", "equal" : "<?php echo $equal; ?>"},
			<?php } ?>
			{}
		];
		merchandise.pop();
	</script>

<?php include($view['basePath'].'/footer.html');?>

<div class="pop_up_border J_subscribe_wraper pro_soldout_pop hidden">
	<div class="pop_close_bar"><span class="pop_close_btn J_pop_subscribeClose"></span></div>
	<p class="f14 bold" id="J_callbackText">成功订阅开售提醒，我们将在开售当天通知您。</p>
	<div class="pop_ok_btn btn100"><a href="javascript:;" class="btn_comm btn100 J_pop_subscribeClose">确定</a></div>
</div>

<script type="text/html" id="J_wrap_pro_template">
	<dl class="J_pro_items" id="J_pro_{$id}" data-hover="dl_hover">
        <dt class="pro_list_pic">
			<a href="{$link}" title="{$name}" target="_blank">
				<img class="lazy J_first_pic" width="235" height="297" alt="{$name}" src="<?php echo $view['staticImg']; ?>/te/vip_loading.gif" data-original="{$img}" />
				<img class="hidden" width="235" height="297" src="" data-load="0" />
				<div class="pro_list_info J_size_area"></div>
			</a>
			<span class="sold_tag soldout_tag" id="J_soldout_{$id}"></span>
		</dt>
        <dd class="pro_list_tit"><a href="{$link}" target="_blank">{$name}</a></dd>
		<dd class="pro_list_data">
			<span class="light_red"><em>&yen;{$sell_price}</em>{$discount}</span>
			<del class="gray">&yen;{$market_price}</del>
		</dd>
    </dl>
</script>
<script type="text/html" id="J_wrap_brand_template">
	{#items}
	<div class="onsale_pic" data-hover="onsale_pic_hover">
		<a href="/show-{$id}.html?q=<?php echo $query['channelId'];?>|0|0|0|0|0">
			<img class="lazy" src="{$logo}" alt="{$name}" height="48" width="98" />
			<div class="onsale_tit">{$name}<br />{$discount}<i class="onsale_tit_tag"></i></div>
		</a>
	</div>
	{#/items}
</script>
</body>
</html>
